#ifndef _H_H
#define _H_H

# include <math.h>
#include <stdlib.h>
#include <stdio.h>
# include "zx_fft.h"

int medianfreq(TYPE_FFT *freqspe,int len);
//计算肌肉疲劳度
int muscle_fatigue(float *data,int len, int fs);
//计算肌肉强度
float muscle_strength(float *data, int len);

//心电其他参数计算
//心电HRV
float HRV_RMSSD(float *data,int len);
double HRV_SDNN(int *data,int len);

//心电 呼吸
//float respiration(float *data, int len,int *pos,int fs);
int respiration(float *data,int num,int *pos,int len,int fs);

//计算脑电的6个参数的函数
void fdatacacu (float *fdata,int m,float *curepoch);


int respiration2(float *data,int num,int *pos,int len,int fs);

#endif
